Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 3 - Window Manager Reference / Window Manager Types and Constants


Window Definition IDs

CHANGED WITH THE APPEARANCE MANAGER

A window definition ID is supplied to the window resource or to a window-creation function to specify which window definition function to use in creating the window. A variation code may also be used to describe variations of the same basic window.

The window definition ID is an integer that contains the resource ID of the window definition function in its upper 12 bits and a variation code in its lower 4 bits. For a given resource ID and variation code, the window definition ID is derived as follows:

window definition ID = (16 x resource ID) + variation code

If you wish to create a custom window, you can write your own window definition function. For an example, see MyWindowDefProc.

IMPORTANT
The window definition IDs for dialog boxes and utility (floating) windows pertain to the appearances of these windows only, not their behaviors. For example, if you want a utility window to have the proper behavior, that is, float, your application must provide for it.
When mapping is enabled, standard pre-Appearance window definition function IDs will be mapped to their Appearance-compliant equivalents. For a discussion of how to enable mapping, see "Introduction to the Appearance Manager". Table 3-1 lists the standard pre-Appearance and Appearance-compliant window definition ID constants.

Table 3-1 Pre-Appearance and Appearance-compliant window definition IDs
Pre-Appearance window Appearance-compliant windowDescription
dBoxProckWindowModalDialogProcModal dialog box
NonekWindowAlertProcModal alert box
movableDBoxProckWindowMovableModalDialogProcMovable modal dialog box
NonekWindowMovableAlertProcMovable modal alert box
plainDBoxkWindowPlainDialogProcModeless dialog box
altDBoxProckWindowShadowDialogProcModeless dialog box with shadow
noGrowDocProckWindowDocumentProcMovable window with no size box
documentProckWindowGrowDocumentProcMovable window with size box
zoomNoGrowkWindowFullZoomDocumentProcMovable window with full zoom box and no size box
zoomDocProckWindowFullZoomGrowDocumentProcMovable window with full zoom box and size box
NonekWindowVertZoomDocumentProcMovable window with vertical zoom box and no size box
NonekWindowVertZoomGrowDocumentProcMovable window with vertical zoom box and size box
NonekWindowHorizZoomDocumentProcMovable window with horizontal zoom box and no size box
NonekWindowHorizZoomGrowDocumentProcMovable window with horizontal zoom box and size box
rDocProcNone (use rDocProc)Round-cornered window
floatProckWindowFloatProcUtility window with no size box or zoom box
floatGrowProckWindowFloatGrowProcUtility window with size box
floatZoomProckWindowFloatFullZoomProcUtility window with full zoom box
floatZoomGrowProckWindowFloatFullZoomGrowProcUtility window with full zoom box and size box
NonekWindowFloatVertZoomProcUtility window with vertical zoom box
NonekWindowFloatVertZoomGrowProcUtility window with vertical zoom box and size box
NonekWindowFloatHorizZoomProcUtility window with horizontal zoom box
NonekWindowFloatHorizZoomGrowProcUtility window with horizontal zoom box and size box
floatSideProckWindowFloatSideProcUtility window with side title bar and no size box or zoom box
floatSideGrowProckWindowFloatSideGrowProcUtility window with side title bar and size box
floatSideZoomProckWindowFloatSideFullZoomProcUtility window with side title bar and full zoom box
floatSideZoomGrowProckWindowFloatSideFullZoomGrowProcUtility window with side title bar, size box, and full zoom box
NonekWindowFloatSideVertZoomProcUtility window with side title bar and vertical zoom box
NonekWindowFloatSideVertZoomGrowProcUtility window with side title bar, vertical zoom box, and size box
NonekWindowFloatSideHorizZoomProcUtility window with side title bar and horizontal zoom box
NonekWindowFloatSideHorizZoomGrowProcUtility window with side title bar, horizontal zoom box, and size box

enum { 
   documentProc                      = 0,  
   dBoxProc                          = 1,
   plainDBox                         = 2,  
   altDBoxProc                       = 3,  
   noGrowDocProc                     = 4,  
   movableDBoxProc                   = 5,  
   zoomDocProc                       = 8,  
   zoomNoGrow                        = 12, 
   rDocProc                          = 16,
   kWindowDocumentProc               = 1024,
   kWindowGrowDocumentProc           = 1025,
   kWindowVertZoomDocumentProc       = 1026,
   kWindowVertZoomGrowDocumentProc   = 1027,
   kWindowHorizZoomDocumentProc      = 1028,
   kWindowHorizZoomGrowDocumentProc  = 1029,
   kWindowFullZoomDocumentProc       = 1030,
   kWindowFullZoomGrowDocumentProc   = 1031,
   kWindowPlainDialogProc            = 1040,
   kWindowShadowDialogProc           = 1041,
   kWindowModalDialogProc            = 1042,
   kWindowMovableModalDialogProc     = 1043,
   kWindowAlertProc                  = 1044,
   kWindowMovableAlertProc           = 1045,
   kWindowFloatProc                  = 1057,
   kWindowFloatGrowProc              = 1059,
   kWindowFloatVertZoomProc          = 1061,
   kWindowFloatVertZoomGrowProc      = 1063,
   kWindowFloatHorizZoomProc         = 1065,
   kWindowFloatHorizZoomGrowProc     = 1067,
   kWindowFloatFullZoomProc          = 1069,
   kWindowFloatFullZoomGrowProc      = 1071,
   kWindowFloatSideProc              = 1073,
   kWindowFloatSideGrowProc          = 1075,
   kWindowFloatSideVertZoomProc      = 1077,
   kWindowFloatSideVertZoomGrowProc  = 1079,
   kWindowFloatSideHorizZoomProc     = 1081,
   kWindowFloatSideHorizZoomGrowProc = 1083,
   kWindowFloatSideFullZoomProc      = 1085,
   kWindowFloatSideFullZoomGrowProc  = 1087,
   floatProc                         = 1985,  
   floatGrowProc                     = 1987,  
   floatZoomProc                     = 1989,  
   floatZoomGrowProc                 = 1991,  
   floatSideProc                     = 1993,  
   floatSideGrowProc                 = 1995,  
   floatSideZoomProc                 = 1997,  
   floatSideZoomGrowProc             = 1999   
};

Constant descriptions

documentProc
Pre-Appearance document window (movable window with size box).
dBoxProc
Pre-Appearance modal dialog box.
plainDBox
Pre-Appearance modeless dialog box.
altDBoxProc
Pre-Appearance modeless dialog box with shadow.
noGrowDocProc
Pre-Appearance movable window with no size box or zoom box.
movableDBoxProc
Pre-Appearance movable modal dialog box.
zoomDocProc
Pre-Appearance movable window with size box and full zoom box.
zoomNoGrow
Pre-Appearance window with full zoom box and no size box.
rDocProc
Pre-Appearance rounded-corner window. You can control the diameter of curvature of a rounded-corner window (window type rDocProc) by adding one of these integers to the rDocProc constant:

Window definition IDDiameters
of curvature
rDocProc16, 16
rDocProc + 24, 4
rDocProc + 46, 6
rDocProc + 610, 10

kWindowDocumentProc
Appearance-compliant movable window with no size box or zoom box.
kWindowGrowDocumentProc
Appearance-compliant standard document window (movable window with size box).
kWindowVertZoomDocumentProc
Appearance-compliant window with vertical zoom box and no size box.
kWindowVertZoomGrowDocumentProc
Appearance-compliant window with vertical zoom box and size box.
kWindowHorizZoomDocumentProc
Appearance-compliant window with horizontal zoom box and no size box.
kWindowHorizZoomGrowDocumentProc
Appearance-compliant window with horizontal zoom box and size box.
kWindowFullZoomDocumentProc
Appearance-compliant window with full zoom box and no size box.
kWindowFullZoomGrowDocumentProc
Appearance-compliant window with full zoom box and size box.
kWindowPlainDialogProc
Appearance-compliant modeless dialog box.
kWindowShadowDialogProc
Appearance-compliant modeless dialog box with shadow.
kWindowModalDialogProc
Appearance-compliant modal dialog box.
kWindowMovableModalDialogProc
Appearance-compliant movable modal dialog box.
kWindowAlertProc
Appearance-compliant alert box.
kWindowMovableAlertProc
Appearance-compliant movable alert box.
kWindowFloatProc
Appearance-compliant utility (floating) window with no size box or zoom box.
kWindowFloatGrowProc
Appearance-compliant utility (floating) window with a size box.
kWindowFloatVertZoomProc
Appearance-compliant utility (floating) window with a vertical zoom box.
kWindowFloatVertZoomGrowProc
Appearance-compliant utility (floating) window with a vertical zoom box and size box.
kWindowFloatHorizZoomProc
Appearance-compliant utility (floating) window with a horizontal zoom box.
kWindowFloatHorizZoomGrowProc
Appearance-compliant utility (floating) window with a horizontal zoom box and size box.
kWindowFloatFullZoomProc
Appearance-compliant utility (floating) window with full zoom box.
kWindowFloatFullZoomGrowProc
Appearance-compliant utility (floating) window with full zoom box and size box.
kWindowFloatSideProc
Appearance-compliant utility (floating) window with side title bar.
kWindowFloatSideGrowProc
Appearance-compliant utility (floating) window with side title bar and size box.
kWindowFloatSideVertZoomProc
Appearance-compliant utility (floating) window with side title bar and vertical zoom box.
kWindowFloatSideVertZoomGrowProc
Appearance-compliant utility (floating) window with side title bar, vertical zoom box, and size box.
kWindowFloatSideHorizZoomProc
Appearance-compliant utility (floating) window with side title bar and horizontal zoom box.
kWindowFloatSideHorizZoomGrowProc
Appearance-compliant utility (floating) window with side title bar, horizontal zoom box, and size box.
kWindowFloatSideFullZoomProc
Appearance-compliant utility (floating) window with side title bar and full zoom box.
kWindowFloatSideFullZoomGrowProc
Appearance-compliant utility (floating) window with side title bar, full zoom box, and size box.
floatProc
Pre-Appearance utility (floating) window with no size box or zoom box.
floatGrowProc
Pre-Appearance utility (floating) window with size box.
floatZoomProc
Pre-Appearance utility (floating) window with zoom box.
floatZoomGrowProc
Pre-Appearance utility (floating) window with size box and zoom box.
floatSideProc
Pre-Appearance utility (floating) window with side title bar and no size or zoom box.
floatSideGrowProc
Pre-Appearance utility (floating) window with side title bar and size box.
floatSideZoomProc
Pre-Appearance utility (floating) window with side title bar and zoom box.
floatSideZoomGrowProc
Pre-Appearance utility (floating) window with side title bar, size box, and zoom box.

WHEN THE APPEARANCE MANAGER IS NOT AVAILABLE
Only the following window definition ID constants are supported:

   documentProc               = 0,  
   dBoxProc                   = 1,
   plainDBox                  = 2,  
   altDBoxProc                = 3,  
   noGrowDocProc              = 4,  
   movableDBoxProc            = 5,  
   zoomDocProc                = 8,  
   zoomNoGrow                 = 12, 
   rDocProc                   = 16,
   floatProc                  = 1985,  
   floatGrowProc              = 1987,  
   floatZoomProc              = 1989,  
   floatZoomGrowProc          = 1991,  
   floatSideProc              = 1993,  
   floatSideGrowProc          = 1995,  
   floatSideZoomProc          = 1997,  
   floatSideZoomGrowProc      = 1999   

Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998